//
//  OTEditGroupCell.m
//  OT_OC
//
//  Created by yunmian on 2019/7/16.
//  Copyright © 2019 James. All rights reserved.
//

#import "OTEditGroupCell.h"
#import "OTGroupModel.h"

@interface OTEditGroupCell ()
{
    UILabel                 *gourpLabel;
    UIView                  *lineView;
}
@end

@implementation OTEditGroupCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    gourpLabel = [[UILabel alloc] init];
    [self.contentView addSubview:gourpLabel];
    
    lineView = [[UIView alloc] init];
    lineView.backgroundColor = ColorHexF5F5F5;
    [self.contentView addSubview:lineView];
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    [gourpLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(UIEdgeInsetsMake(0, 10, 0, 10));
    }];
    
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.bottom.right.offset(0);
        make.height.offset(1);
    }];
}

#pragma mark Set
- (void)setGroup:(OTGroupModel *)group {
    _group = group;
    gourpLabel.text = group.groupName;
}



@end
